<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var a = 12.34;
        var b = 12.64
        console.log(Math.ceil(a)); //向上取整
        console.log(Math.floor(a)); //向下取整
        console.log(Math.round(a)); 
        console.log(Math.round(b)); //四舍五入
        console.log(Math.random()); //0(包括)-1(不包括)取随机数
    </script>

    <script>
        var c = Math.random()*100;
        console.log(Math.floor(c)+1)
    </script>
</body>
</html>